/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package merlion.mrp.ppm.session;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collection;
import javax.ejb.Remote;
import merlion.mrp.ppm.entity.DailyPlannedProduction;
import merlion.mrp.ppm.entity.Product;
import merlion.mrp.ppm.entity.SOP;
import merlion.mrp.ppm.entity.SalesForecast;

/**
 *
 * @author zhiqi chen
 */

@Remote
public interface SalesOptPlanningSessionRemote {

    boolean checkAbleToCreateSop(int sopStartYear, int sopStartMonth, Timestamp currentTime);

    boolean checkCreatedSOPAlready(int sopStartYear, int sopStartMonth);

    boolean checkCreatedSOPBefore(int sopStartYear, int sopStartMonth);

    Collection<SOP> getAllMrpSops();

    ArrayList<Long> getInventoryOfPrevSeasonLastMonth(int sopStartYear, int sopStartMonth);

    ArrayList<DailyPlannedProduction> getMonthlyDailyPlannedProductionByProduct(Product p, int selectedYear, int selectedMonth);

    SOP getMrpSop(String sopIdStr);

    SOP getSOP(int sopStartYear, int sopStartMonth);

    SalesForecast getSalesForecast(int sopStartYear, int sopStartMonth);

    ArrayList<ArrayList<Long>> getSeasonSalesForecastData(int sopStartYear, int sopStartMonth);

    ArrayList<ArrayList<Long>> getSeasonSalesForecastDataForUpdate(int sopStartYear, int sopStartMonth);

    ArrayList<Integer> getWorkingDaysList(int sopStartYear, int sopStartMonth);

    boolean isPublicHoliday(Calendar cal);

    boolean persistMrpSop(SOP sop);

    boolean saveMrpSop(SOP newSop);
    
}
